class HotWebModel {
// {
//     "errorCode": 0,
//     "errorMsg": ""
// }

  final List<HotWeb>? data;
  final num? errorCode;
  final String? errorMsg;

  HotWebModel({
    this.data,
    this.errorCode,
    this.errorMsg,
  });

  factory HotWebModel.fromJson(Map<String, dynamic> json) {
    return HotWebModel(
      data: json['data'] == null
          ? null
          : List<HotWeb>.from(json['data'].map((x) => HotWeb.fromJson(x))),
      errorCode: json['errorCode'],
      errorMsg: json['errorMsg'],
    );
  }

  Map<String, dynamic> toJson() => {
        'data': data?.map((e) => e.toJson()).toList(),
        'errorCode': errorCode,
        'errorMsg': errorMsg,
      };
}

class HotWeb {
// {
//     "category": "源码",
//     "icon": "",
//     "id": 22,
//     "link": "https://www.androidos.net.cn/sourcecode",
//     "name": "androidos",
//     "order": 11,
//     "visible": 1
// }

  final String? category;
  final String? icon;
  final num? id;
  final String? link;
  final String? name;
  final num? order;
  final num? visible;

  HotWeb({
    this.category,
    this.icon,
    this.id,
    this.link,
    this.name,
    this.order,
    this.visible,
  });

  factory HotWeb.fromJson(Map<String, dynamic> json) {
    return HotWeb(
      category: json['category'],
      icon: json['icon'],
      id: json['id'],
      link: json['link'],
      name: json['name'],
      order: json['order'],
      visible: json['visible'],
    );
  }

  Map<String, dynamic> toJson() => {
        'category': category,
        'icon': icon,
        'id': id,
        'link': link,
        'name': name,
        'order': order,
        'visible': visible,
      };
}
